const baseUrl = 'http://43.139.234.245:8900'
// const baseUrl = 'https://516568da.r5.vip.cpolar.cn'
const sendRequest = (params) => {
    //   console.log(params); 
    return new Promise((resolve, reject) => {
        wx.request({
            url: baseUrl + params.url,
            method: params.method || 'GET',
            data: params.data || '',
            success: res => {
                // console.log(res);
                resolve(res)
            },
            fail: err => {
                reject(err)
            }
        })
    })
}

export default sendRequest